package study

import "fmt"

// go 语言接口 多态学习
type User struct {
	Name string
	Age int
	Role string
}

type Admin struct {
	name string
	age int
	role string
}

type printInfo interface {
	PrintInfo()
}

func (u *User) PrintInfo ()  {
	fmt.Println(u.Age,u.Name,u.Role)
}
func (a *Admin) PrintInfo()  {
	fmt.Println(a.age,a.name,a.role)
}